home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20031118-20041115 / 000354_fdc@columbia.edu_Tue Aug 10 13:55:02 2004.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Path: newsmaster.cc.columbia.edu!not-for-mail
  2. From: Frank da Cruz <fdc@columbia.edu>
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: get /command syntax help
  5. Date: 10 Aug 2004 17:54:45 GMT
  6. Organization: Columbia University
  7. Lines: 28
  8. Message-ID: <slrnchi2v5.8t0.fdc@sesame.cc.columbia.edu>
  9. References: <HwORc.8953$nx2.3208@newsread2.news.atl.earthlink.net> <slrnchffbl.ech.fdc@sesame.cc.columbia.edu> <_q6Sc.10037$nx2.9157@newsread2.news.atl.earthlink.net>
  10. Reply-To: fdc@columbia.edu
  11. NNTP-Posting-Host: sesame.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1092160485 3973 128.59.59.56 (10 Aug 2004 17:54:45 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 10 Aug 2004 17:54:45 GMT
  15. User-Agent: slrn/0.9.8.0 (SunOS)
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15114
  17.  
  18. On 2004-08-10, <nospam@killspam.org> <nospam@killspam.org> wrote:
  19. :>"Frank da Cruz" <fdc@columbia.edu> wrote in message
  20. :> REMOTE TYPE filename
  21. :
  22. : Thanks Frank, for the fast replay -- which answered the first goal, I
  23. : started looking at the get /command switch when I couldn't figure out how to
  24. : stuff the rtype output to a variable...
  25. :  --  rtype will display file contents ,
  26. : SET QUIET ON gets rid of extraneous header/footer info but I still have to
  27. : figure out how to stuff the filecontents into a macro or variable.
  28. :
  29. There is no OBVIOUS way to do this.  Consider that a remote file might be
  30. gigabytes long.
  31.  
  32. Still, there is a non-obvious way:
  33.  
  34.   def xx query kermit command(cat filename)
  35.   do xx
  36.  
  37. where "cat" is the command used on the other computer to display a file's
  38. contents (use "type" for most non-Unix systems).  Defining a macro to do this
  39. and then executing the macro is a trick to suppress display of the file on the
  40. screen during download ("set quiet on" doesn't affect QUERY).
  41.  
  42. The result is in the \v(query) variable, unless the file is too big to fit
  43. or it contains NUL bytes, in which case it will be truncated.
  44.  
  45. - Frank